package com.zwj.common.utils.treeNode;

import java.util.ArrayList;
import java.util.List;

/**
 * @author zwj
 * @Description: 树形结构生成
 * @date 2022/7/14 2:10 下午
 */
public class Test {
    public static void main(String[] args) {
        List<Menu> menuList = new ArrayList<Menu>();
        /*插入一些数据*/
        menuList.add(new Menu("GN001D000", "0", "系统管理", "/admin", "Y", null));
        menuList.add(new Menu("GN001D100", "GN001D000", "权限管理", "/admin", "Y", null));
        menuList.add(new Menu("GN001D110", "GN001D100", "密码修改", "/admin", "Y", null));
        menuList.add(new Menu("GN001D120", "GN001D100", "新加用户", "/admin", "Y", null));
        menuList.add(new Menu("GN001D200", "GN001D000", "系统监控", "/admin", "Y", null));
        menuList.add(new Menu("GN001D210", "GN001D200", "在线用户", "/admin", "Y", null));

        MenuTree menuTree = new MenuTree(menuList);
        List<Menu> menus = menuTree.builTree();
        System.out.println(menus);
    }
}
